﻿Public Class DocGia

    Private _HoTen As String
    Public Property HoTen() As String
        Get
            Return _HoTen
        End Get
        Set(ByVal value As String)
            _HoTen = value
        End Set
    End Property

    Private _NgayLap As DateTime
    Public Property NgayLap() As DateTime
        Get
            Return _NgayLap
        End Get
        Set(ByVal value As DateTime)
            _NgayLap = value
        End Set
    End Property

    Private _SoThang As Integer
    Public Property SoThang() As Integer
        Get
            Return _SoThang
        End Get
        Set(ByVal value As Integer)
            _SoThang = value
        End Set

    End Property

    Public Overridable Sub Nhap()
        Console.Write("Nhap Ho ten: ")
        _HoTen = Console.ReadLine
        Console.Write("Ngay lap the: ")
        _NgayLap = Convert.ToDateTime(Console.ReadLine)
        Console.Write("So Thang hieu luc the: ")
        _SoThang = Convert.ToInt16(Console.ReadLine)
    End Sub
    Public Overridable Sub Xuat()
        Console.Write("Ho ten: {0}", _HoTen)
        Console.Write(", Ngay lap: {0}", _NgayLap)
        Console.Write(", So thang: {0}", _SoThang)

    End Sub
    Public Overridable Function TinhTien() As Double
        Return _SoThang
    End Function


End Class
